home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / dejagnu.lha / dejagnu-1.0.1 / tcl / Makefile.in < prev    next >
Makefile  |  1993-05-09  |  5KB  |  184 lines

  1. #
  2. # This Makefile is for use when distributing Tcl to the outside world.
  3. # It is normally set up by running the "config" script.  Before modifying
  4. # this file by hand, you should read through the "config" script to see
  5. # what it does.
  6. #
  7.  
  8. srcdir         = @srcdir@
  9.  
  10. VPATH         = @srcdir@
  11.  
  12. #
  13. # both these values get replaced by running configure
  14. #
  15. prefix         = /usr/local
  16. exec_prefix     = /usr/local
  17.  
  18. bindir         = $(exec_prefix)/bin
  19. libdir         = $(exec_prefix)/lib
  20.  
  21. datadir     = $(prefix)/lib
  22. mandir         = $(prefix)/man
  23. man1dir     = $(mandir)/man1
  24. man2dir     = $(mandir)/man2
  25. man3dir     = $(mandir)/man3
  26. infodir     = $(prefix)/info
  27. manpostfix      = 1
  28.  
  29. includedir     = $(prefix)/include
  30. docdir         = $(datadir)/doc
  31.  
  32. SHELL         = /bin/sh
  33.  
  34. INSTALL         = @INSTALL@
  35. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  36. INSTALL_DATA    = @INSTALL_DATA@
  37.  
  38. CC         = cc
  39. AR         = ar
  40. AR_FLAGS     = qv
  41. CFLAGS         = -g
  42. CFLAGS_INT     = -DTCL_LIBRARY=\"${TCL_LIBRARY}\" $(CFLAGS) @DEFS@
  43.  
  44. RANLIB         = @RANLIB@
  45. RM         = rm -f
  46.  
  47. RUNTEST        = runtest
  48. RUNTESTFLAGS    =
  49.  
  50. TARGETLIB       = libtcl.a
  51.  
  52. TCL_LIBRARY     = $(datadir)/tcl
  53. TCL_LIBTCL     = $(libdir)/libtcl.a
  54.  
  55. GENERIC_OFILES = regexp.o tclAssem.o tclBasic.o tclCkalloc.o \
  56.         tclCmdAH.o tclCmdIL.o tclCmdMZ.o tclExpr.o tclGet.o \
  57.         tclHash.o tclHistory.o tclParse.o tclProc.o tclUtil.o \
  58.         tclVar.o
  59.  
  60. UNIX_OFILES =    panic.o tclEnv.o tclGlob.o tclUnixAZ.o tclUnixStr.o \
  61.         tclUnixUtil.o 
  62.  
  63. COMPAT_OFILES = @LIBOBJS@
  64.  
  65. #### Host, target, and site specific Makefile fragments come in here.
  66. ###
  67.  
  68. OFILES = ${GENERIC_OFILES} ${UNIX_OFILES} ${COMPAT_OFILES}
  69.  
  70. .c.o:
  71.     $(CC) -c -I$(srcdir) -I. $(CFLAGS_INT) $<
  72.  
  73. # Do we want/need any config overrides?
  74. #     
  75.  
  76. STAGESTUFF =    $(TARGETLIB) *.o
  77.  
  78. all:        $(TARGETLIB) tclTest
  79.  
  80. info:
  81. clean-info:
  82. install-info:
  83. dvi:
  84. installcheck:
  85. check:    tclTest
  86.     $(RUNTEST) $(RUNTESTFLAGS) --tool tcl --srcdir $(srcdir)/testsuite
  87.  
  88. install:     all
  89.     -parent=`echo $(libdir)|sed -e 's@/[^/]*$$@@'`; \
  90.     if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
  91.     -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi
  92.     $(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB).n
  93.     $(RANLIB) $(libdir)/$(TARGETLIB).n
  94.     mv -f $(libdir)/$(TARGETLIB).n $(libdir)/$(TARGETLIB)
  95.     -parent=`echo $(TCL_LIBRARY)|sed -e 's@/[^/]*$$@@'`; \
  96.     if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
  97.     -if [ -d $(TCL_LIBRARY) ] ; then true ; else mkdir $(TCL_LIBRARY) ; fi
  98.     # install the tcl library files
  99.     $(INSTALL_DATA) $(srcdir)/library/*.tcl $(TCL_LIBRARY)
  100.     -parent=`echo $(includedir)|sed -e 's@/[^/]*$$@@'`; \
  101.     if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
  102.     -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; fi
  103.     #install the header files
  104.     for i in tcl.h tclHash.h tclInt.h ; do \
  105.       $(INSTALL_DATA) $(srcdir)/$$i $(includedir)/$$i ; \
  106.     done
  107.     # install the man pages
  108.     -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; fi
  109.     -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
  110.     -if [ -d $(man3dir) ] ; then true ; else mkdir $(man3dir) ; fi
  111.     rootme=`pwd`; cd $(srcdir)/doc ; \
  112.     for i in *.3 ; do \
  113.       $(INSTALL_DATA) $$i $(man3dir)/$$i ; \
  114.     done ; \
  115.     for i in *.n ; do \
  116.       newname=`echo $$i|sed -e 's/\.n/\.1/'` ; \
  117.       $(INSTALL_DATA) $$i $(man1dir)/$$newname ; \
  118.     done ; \
  119.     cd $$rootme
  120.  
  121. $(TARGETLIB):    $(OFILES)
  122.     $(RM) -f $@
  123.     $(AR) $(AR_FLAGS) $@ $(OFILES)
  124.     $(RANLIB) $@
  125.  
  126. $(OFILES) :    $(HFILES)
  127.  
  128. strerror.c     : $(srcdir)/compat/strerror.c
  129.     cp $(srcdir)/compat/strerror.c .
  130.  
  131. strtoul.c     : $(srcdir)/compat/strtoul.c
  132.     cp $(srcdir)/compat/strtoul.c .
  133.  
  134. opendir.c     : $(srcdir)/compat/opendir.c
  135.     cp $(srcdir)/compat/opendir.c .
  136.  
  137. strstr.c    : $(srcdir)/compat/strstr.c
  138.     cp $(srcdir)/compat/strstr.c .
  139.  
  140. strtod.c     : $(srcdir)/compat/strtod.c
  141.     cp $(srcdir)/compat/strtod.c .
  142.  
  143. strtol.c     : $(srcdir)/compat/strtol.c
  144.     cp $(srcdir)/compat/strtol.c .
  145.  
  146. .PHONEY: all etags tags ls clean 
  147.  
  148. etags tags:    TAGS
  149.  
  150. TAGS: $(CFILES)
  151.     etags $(HFILES) $(CFILES)
  152.  
  153. ls:
  154.     @echo Makefile $(HFILES) $(CFILES)
  155.  
  156. configured:
  157.     @echo "The configuration script \"./config\" hasn't been run"
  158.     @echo "successfully yet.  Please run it as described in the "
  159.     @echo "README file, then run make again."
  160.     exit 1
  161.  
  162. clean:
  163.     rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors tclTest
  164.  
  165. distclean:    clean
  166.     -$(RM) Makefile config.status
  167.     for i in compat/*.[ch] ; do rm -f `basename $$i` ; done
  168.  
  169. realclean: distclean
  170.  
  171. mostlyclean: distclean
  172. force:
  173.  
  174. Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) \
  175.     $(target_makefile_frag)
  176.     $(SHELL) ./config.status
  177.  
  178. tclTest: tclTest.o $(TARGETLIB)
  179.     $(CC) $(CFLAGS) tclTest.o $(TARGETLIB) -o tclTest
  180.  
  181. test: tclTest
  182.     ( echo cd $(srcdir)/tests ; echo source all ) | ./tclTest
  183.  
  184.